//------------------------------------------------------------------------
// <copyright file="MetaDataTable.cs" company="DevDir">
//   Copyleft (c) DevDir. No rights reserved.
// </copyright>
// <author>Nikita Sharov</author>
//------------------------------------------------------------------------

namespace DevDir.Mp3
{
  using System;
  using System.Data;
  
  public class MetaDataTable : DataTable
  {
    private DataColumn artistColumn = 
      new DataColumn("Artist", typeof(string));
    private DataColumn yearColumn =
      new DataColumn("Year", typeof(uint));
    private DataColumn albumColumn =
      new DataColumn("Album", typeof(string));
    private DataColumn trackColumn =
      new DataColumn("Track", typeof(uint));
    private DataColumn trackCountColumn =
      new DataColumn("TrackCount", typeof(uint));
    private DataColumn discColumn = 
      new DataColumn("Disc", typeof(uint));
    private DataColumn discCountColumn =
      new DataColumn("DiscCount", typeof(uint));
    private DataColumn titleColumn =
      new DataColumn("Title", typeof(string));
    private DataColumn durationColumn =
      new DataColumn("Duration", typeof(TimeSpan));    
    private DataColumn genreColumn =
      new DataColumn("Genre", typeof(string));

    public MetaDataTable()
    {
      Columns.Add(this.artistColumn);
      Columns.Add(this.yearColumn);
      Columns.Add(this.albumColumn);
      Columns.Add(this.trackColumn);
      Columns.Add(this.trackCountColumn);
      Columns.Add(this.discColumn);
      Columns.Add(this.discCountColumn);
      Columns.Add(this.titleColumn);
      Columns.Add(this.durationColumn);
      Columns.Add(this.genreColumn);
    }

    public DataColumn ArtistColumn
    {
      get { return this.artistColumn; }
    }

    public DataColumn YearColumn
    {
      get { return this.yearColumn; }
    }

    public DataColumn AlbumColumn
    {
      get { return this.albumColumn; }
    }    

    public DataColumn TrackColumn
    {
      get { return this.trackColumn; }
    }

    public DataColumn TrackCountColumn
    {
      get { return this.trackCountColumn; }
    }

    public DataColumn DiscColumn
    {
      get { return this.discColumn; }
    }

    public DataColumn DiscCountColumn
    {
      get { return this.discCountColumn; }
    }

    public DataColumn TitleColumn
    {
      get { return this.titleColumn; }
    }

    public DataColumn DurationColumn
    {
      get { return this.durationColumn; }
    }

    public DataColumn GenreColumn
    {
      get { return this.genreColumn; }
    }

    protected override DataRow NewRowFromBuilder(DataRowBuilder builder)
    {
      return new MetaDataRow(builder);
    }

  }
}
